import {ALESSONDATA} from './actionType'
import { get } from '@u/http.js'

const loadSync =(list) =>{
    return{
        type:ALESSONDATA,
        list
    }
}

const loadDataAsync =()=>{
    return async (dispatch)=>{
        let result = await get({
            url:'/api/keJian/books?xkId=1&typeId=1'
        })
        dispatch( loadSync(result.data.books))
    }
}

export {
    loadSync,
    loadDataAsync
}